<template>
    <slot>hello page a</slot>
    <el-row class="mb-4">
      <el-button type="primary" @click="toPage1">页面跳转方式1</el-button>
      <el-button type="success" @click="toPage2">页面跳转方式2</el-button>
      <el-button type="danger"><router-link to="/pageB">页面跳转方式3</router-link></el-button>
    </el-row>
  </template>
  
  <script>
  import router from "@/router";
  
  export default {
    name: "pageA",
    methods: {
      toPage1(){
        router.replace("/pageB");
      },
      toPage2(){
        router.push("/pageB");
      }
    }
  }
  </script>
  
  <style scoped>
  
  </style>
  